﻿
function ResultEvent(result)
{
	this.result = result;
	this.errorCode = null;
	this.isSuccess = is.Empty(this.errorCode);
	this.errorMessage = null;
}
var RE = ResultEvent;
ResultEvent.createError = function(errorCode, errorMessage, result)
{
	var r = new ResultEvent(result);
	r.errorCode = errorCode || 'Error';
	r.isSuccess = false;
	r.errorMessage = errorMessage;
	return r;
}
ResultEvent.prototype =
{
	getResult: function() { return this.result; },
	success: function() { return is.Empty(this.errorCode); },
	getErrorCode: function() { return this.errorCode; },
	getErrorMessage: function() { return this.errorMessage; }
};
